package com.forestar.mapControl.utils.mapConvert.geometry;


import com.forestar.mapControl.utils.mapConvert.geometry.coordinatesystem.CoordinateSystem;
import com.mapzone.api.geometry.mzPoint;

/**
 * 节点
 * Created by zjb on 2017/8/10.
 */

public class GeoNodePoint extends GeoPoint
  {
    private int pathIndex;  //所属环或path的序号
    private int index;       //在环或path上的序号
    private boolean isSelected;
//    private NodeOverlayLayer parentOverlayLayer;  //所属节点图层

    public GeoNodePoint(CoordinateSystem coordSystem, mzPoint mzPoint, int pathIndex, int index)
      {
        super(coordSystem, mzPoint);
        this.pathIndex = pathIndex;
        this.index = index;
      }

    public GeoNodePoint(GeoPoint geoPoint, int pathIndex, int index)
      {
        super(geoPoint.getCoordinateSystem(), (mzPoint) geoPoint.getInternalObject());
        this.pathIndex = pathIndex;
        this.index = index;
      }

    public int getIndex()
      {
        return index;
      }

    public int getPathIndex()
      {
        return pathIndex;
      }

    public void setIndex(int index)
      {
        this.index = index;
      }

    public void setPathIndex(int pathIndex)
      {
        this.pathIndex = pathIndex;
      }

    public boolean isSelected()
      {
        return isSelected;
      }

    public void setSelected(boolean selected)
      {
        isSelected = selected;
      }

    public void updatePoint(GeoPoint geoPoint)
      {
        setXY(geoPoint.getX(), geoPoint.getY());
      }

  }
